home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
snip9_91.arc
/
CURSOR2.C
< prev
next >
Wrap
Text File
|
1991-09-17
|
1KB
|
30 lines
/*
** CUESOR.C - hide/unhide the cursor
**
** by: Gary Chambers
*/
void cursor(char state)
{
union REGS regs;
static int oldstart=0, oldstop=0;
if (state) /* Restores cursor */
{
regs.h.ah = 0x01; /* BIOS Set Cursor Type */
regs.h.ch = oldstart; /* Retrieve starting scan line */
regs.h.cl = oldstop; /* Retrieve ending scan line */
int86(0x10, ®s, ®s); /* Call BIOS */
}
else /* Removes cursor */
{
regs.h.ah = 0x03; /* BIOS Get Cursor Position */
int86(0x10, ®s, ®s); /* Call BIOS */
oldstart = regs.h.ch; /* Save starting scan line */
oldstop = regs.h.cl; /* Save ending scan line */
regs.h.ah = 0x01; /* BIOS Set Cursor Type */
regs.h.ch = 0x20; /* Set bit 5 in CH */
int86(0x10, ®s, ®s); /* Call BIOS */
}
}